﻿@model IEnumerable<DA.ERP_Orders>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            ERP_Users
        </th>
        <th>
            ERP_Suppliers
        </th>
        <th>
            OrderDetails
        </th>
        <th>
            Price
        </th>
        <th>
            PaymentMethod
        </th>
        <th>
            BudgetSectionNumber
        </th>
        <th>
            CreationDate
        </th>
        <th>
            OrderStatus
        </th>
        <th>
            ManagerUpdateDate
        </th>
        <th>
            ManagerNotes
        </th>
        <th>
            OrderReason
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ERP_Users.Password)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ERP_Suppliers.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OrderDetails)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PaymentMethod)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BudgetSectionNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreationDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OrderStatus)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ManagerUpdateDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ManagerNotes)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OrderReason)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.OrderId }) |
            @Html.ActionLink("Details", "Details", new { id=item.OrderId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.OrderId })
        </td>
    </tr>
}

</table>
